package com.onpositive.datamap.core.impl;

import com.onpositive.data.IPropertyMetadata;
import com.onpositive.data.IReadableObjectCollection;
import com.onpositive.datamap.core.IImageObject;

public class InternalImageObject implements IImageObject {

	IPropertyMetadata meta;
	@SuppressWarnings("rawtypes")
	IReadableObjectCollection collection;
	int num;

	public InternalImageObject(int num2, IPropertyMetadata mainImage, IReadableObjectCollection<?> collection) {
		this.num=num2;
		this.meta=mainImage;
		this.collection = collection;
	}

	@SuppressWarnings("unchecked")
	@Override
	public byte[] getBytes(int width, int height) {
		return (byte[]) collection.getValue(num, meta);
	}

	@Override
	public String getUrl(int width, int height) {
		return null;
	}

	@Override
	public String getCaption() {
		return "";
	}

}
